<html>

<head>
	<meta charset="UTF-8">
	<style type="text/css">
		div{
			width:200px;
			height: 200px;
		}

		#container{
			background-color: #00FF00;
			margin-top: 20px;
		}

		.class1{
			border-radius: 12px;
			box-shadow: 4px 3px  3px #ccc;
		}
	</style>

	<script type="text/javascript" src='js/jquery-1.11.1.js'></script>
	<script type="text/javascript">

		function setDom(){
			var container = $("#container");
			if(container.hasClass("class1")){
				container.removeClass("class1");
			}else{
				container.addClass("class1");	
			}	
		};
	</script>

    <title>jQuery操作文档属性</title>
</head>

<body>
	<button id="btn" onclick="setDom()">设置</button>
	<br/>
	<div id="container"></div>
</body>

</html>
